package com.zhentao.service.impl;

import com.zhentao.mapper.DeptMapper;
import com.zhentao.pojo.Dept;
import com.zhentao.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Date 2024/4/10 14:45
 * @Author xdm
 **/
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Transactional
    @Override
    public Integer add(Dept dept) {

        System.out.println(dept+"ddd");
        dept.setName(dept.getName()+"服务提供者");

         deptMapper.insert(dept);
         return 1;
    }
}
